﻿using System;
using System.Collections.Generic;
using System.Text;

//CID 0766 //2011.01.23 //Begin
namespace InfoJetSoft.Service.XPath.Exprs
{
    public class LiteralExpr : IExpr
    {
        private string _literal = null;

        public LiteralExpr(string literal)
        {
            this._literal = literal;
        }

        public string Literal
        {
            get
            {
                return this._literal;
            }
        }

        public void Print(StringBuilder buffer)
        {
            buffer.Append("'" + this._literal + "'");
        }

        public object Evaluate(ExprContext context)
        {
            return this._literal;
        }

        //CID 0866 //2011.04.01 //Begin
        public void Visit(IExprVisitor visitor)
        {
        }
        //CID 0866 //2011.04.01 //End
    }
}
//CID 0766 //2011.01.23 //End
